#ifndef HOTEL_FORM_H
#define HOTEL_FORM_H

#include <Qt\qdialog.h>
#include <Qt\qlabel.h>
#include <Qt\qlineedit.h>
#include <Qt\qboxlayout.h>
#include <Qt\qpushbutton.h>
#include <Qt\qcolor.h>
#include <Qt\qpalette.h>
#include <Qt\qregexp.h>

#include "Hotel.h"

class PropertiesDialog;

class HotelForm : public QDialog{
	Q_OBJECT
public :
	static const int MODE_ADD;
	static const int MODE_MODIFY;
	
	static const int SEPARATOR_STRETCH_FACTOR;
	static const int LABEL_STRETCH_FACTOR;
	static const int FIELD_STRETCH_FACTOR;

private :
	QBoxLayout* layout;

	QLabel* nameLabel;
	QLabel* mailLabel;

	QLineEdit* name;
	QLineEdit* mail;
	
	QPushButton* okButton;
	QPushButton* cancelButton;

	Hotel* hotel;
	int mode;
	
	HotelForm(const HotelForm&) {}
	bool verifyFields(void);

public :
	HotelForm(PropertiesDialog* _parent, Hotel* _hotel = 0);

	Hotel* getHotel(void) const { return hotel; }
	int getMode(void) const { return mode; }

public slots :
	void validate(void);
	void cancel(void);

};

#endif //HOTEL_FORM_H